home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
12
/
9
/
DISK1298.ZIP
/
CHAP07.DOC
< prev
next >
Wrap
Text File
|
1988-10-24
|
50KB
|
1,885 lines
CHAPTER 7 - FILE COMMANDS
FILES COMMAND MENU
_____________________________________________________________________
Edit Search Print >Files< Utilities Quit
Open Close Records List Dir Maintenance Fields Status
_____________________________________________________________________
The Files Command Menu is entered from the Main Command
Menu by pressing [F]. The Files Command Menu will appear:
_____________________________________________________________________
>Open< Close Records List Dir Maintenance Fields Status
Open file
_____________________________________________________________________
The Open Command lets you open a 3by5 file or any ASCII,
WordStar or WordPerfect file. Only 3by5 files may be edited
from the 3by5 program. However, ASCII, WordStar and
WordPerfect files may be imported, into a 3by5 file.
Alternatively, 3by5 records may be exported to ASCII, WordStar
and WordPerfect files.
The Close Command is used to close an open file.
The Records Command is used to copy and move records from
one file to another. It is also used to erase records within a
file. The source and destination files may be 3by5, ASCII,
WordStar or WordPerfect files. If the source file is a 3by5
file, you may sort the records before transferring them to
another file.
The Records Command can also be used to sort and copy/print
records marked during a search.
105
3by5 Chapter 7
The List Command allows you to determine what files are on a
disk. You may use the List Command to open a file, rename
it, or erase it from the disk. The List Command can also be
used to navigate through directories.
The Dir Command is used to change the current directory
(and/or disk drive), make or remove directories, and list
subdirectories.
The Maintenance Command is used to index a 3by5 file that
has a damaged or deleted index file, or pack a 3by5 file that
has deleted records or wasted space.
The Fields Command is used to indicate which fields in a
record will be copied to another record in a different file or
redefine the fields in a file.
The Status Command is used to display additional information
about currently open files (e.g file size, index density.
106
FILE COMMANDS
Open files are assigned a number from 1 to 5:
_____________________________________________________________________
3by5 Files
Open Files
1
2
3
4
5
Dir: A:\
>Open< Close Records List Dir Maintenance Fields Status
Open file
_____________________________________________________________________
File numbers are used to refer to the open files and help
you avoid typing the name of the file each time you want
to issue a command.
After a file is opened, the file drive, directory path, file
name and extension will be displayed.
107
3by5 Chapter 7
3by5 FILE TYPES
3by5 stores your text in files on hard disk or diskette.
3by5 files come in pairs: a SOURCE FILE that contains
text and structured data, and a companion INDEX FILE.
The various types of files are designated by the file
extension:
File Type Source Index
Extension Extension
Standard 3by5 3X5 MAP
Letter LET IET
Document DOC IOC
Macro MAC IAC
Print Form PFM IFM
Reference REF IEF
Reference Style RFS IFS
3by5 Program PRG IRG
ASCII text TXT (no index)
Print PRN (no index)
Microsoft Word MW (no index)
Wordstar WS (no index)
WordPerfect WP (no index)
108
FILE COMMANDS
FILES-OPEN Command
_____________________________________________________________________
>Open< Close Records List Dir Maintenance Fields Status
Open file
_____________________________________________________________________
You may open up to five 3by5 or other files at one time.
When a 3by5 file is opened, its companion index file is also
opened. The index file is not included as one of the five files
that may be opened.
Press [O] to open a file, and the program will prompt you to
enter the name of the file to open.
Type in the name of the file that you want to open. If the
file is on a disk drive that is not the default DOS drive,
include the disk drive using standard DOS file specification
(e.g. B:FILE1). If the file is in a directory other than the
default directory, include the directory path. For example:
C:\LEVEL1\LEVEL2\FILENAME
If you enter a file name without an extension, the program will
assume that the file is a 3by5 file and append the extension
"3X5".
If the file is NOT a 3by5 file and does not have an extension,
place a "." (period) after the file name to indicate that the file
has no extension and is not a 3by5 file.
For example, "FILE1" will open the file FILE1.3X5, while
"FILE1." will open the file FILE1. "FILE1.WS" will open the
file FILE1.WS.
If the file is found, it will be opened. If the file is not a
standard 3by5 file, the program will ask you for the file type
(ASCII, WordStar or Word Perfect).
The List Command may also be used to open files.
109
3by5 Chapter 7
BUILDING A 3by5 FILE
If you attempt to open a file that does not exist, you will be
asked whether you want to build the file:
_____________________________________________________________________
Unable to open file. Do you want to build the file? (Y/N). Y
_____________________________________________________________________
Press [Y] to build the file.
If one or more files are open, the program will prompt
you:
_____________________________________________________________________
File: filename
Build like file (0-5): 0 = new file
_____________________________________________________________________
This prompt allows you to build a file similar to one that
is already open. The file parameters (e.g. file type, record
length, number and name of fields) of an open file may be
used to build the new file. You may modify any of the
parameters.
If you want to use an open file as a model for building a
new file, type the number of the file.
110
FILE COMMANDS
If not, press [N], and the program will display the file
types and ask you to specify a type:
_____________________________________________________________________
File Types:
A 3by5
B Letter
C Document
D Reference
E Reference Style
F Print Form
G Macro
H Program
I Mark
J ASCII, WordStar, WordPerfect
Select file type: A
_____________________________________________________________________
If the file is a non-3by5 file, see page 123.
If the file is a Letter, Document, Print Form or Program
File, see page 116.
If you select a Standard 3by5, Reference, Reference Style,
or Macro file, the program will ask you to define the
fields. The following screen will be displayed:
111
3by5 Chapter 7
_____________________________________________________________________
3by5 Files
Open Files
1
2
3
4
5
FILENAME
Name Type Format/Mask Name Type Format/Mask
A N
B O
C P
D Q
E R
F S
G T
H U
I V
J W
J X
L Y
M Z
Field Name:
<Esc> Cancel <F10> Save <F3> Delete Field <F4> Insert Field
_____________________________________________________________________
A field name may be from 0 to 8 characters long. Type
the name of the field, and press <Enter>. The program
will prompt for the field type:
_____________________________________________________________________
>Free< Line Number Date Time Mask Person
Free-form text
_____________________________________________________________________
112
FILE COMMANDS
The field types are:
FREE-TEXT: You can type any text in this field. Multiple
lines of text may be entered.
LINE: You may type only one line of text in this field.
The program will prompt for the maximum number of
characters in the field.
NUMBER: This field is used to enter only numeric data or
blank spaces. If you select this field type, the program
will ask for the field length (up to 24 characters). After
you specify the field length, the program will ask for the
number of spaces to the right of the decimal place. Enter
0 (zero) if the number is an integer.
DATE: This field is used to enter dates in a fixed format.
If you select this field type, the program will ask for the
date mask. The date mask is entered using dd, mm, mmm,
yy, and yyyy characters. For example:
mm/dd/yy 01/12/52
mm/dd/yyyy 01/12/1952
mm-dd-yy 01-12-52
dd.mm.yyyy 12.01.1952
mmm-dd-yyyy Jan-12-1952
The date field may be up to 15 characters long.
TIME: This field is used to enter time in a fixed format.
If you select this field type, the program will ask for the
time mask. The time mask is entered using hh, mm, and ss
characters. For example:
hh:mm 15:30
hh:mm:ss 01:20:33
The time field may be up to 15 characters long.
113
3by5 Chapter 7
MASK: This field type is used to enter numeric and
alphanumeric data in a fixed format. The # character
specifies that a number (0 to 9) may be entered. The ?
character specifies that any alphanumeric character may be
entered. The ! character specifies that any alphabetic
character will be converted to upper case (other characters
are not converted).
For example:
###-###-#### 123-345-4567
IBM CODE: ??;### IBM CODE: AD;3423
!#! #!# N9B 3P4
The mask field may be up to 15 characters long.
PERSON: This field is used to enter a person's name. The
name is entered in the format:
Last_name, First_name, Middle_name.
Last_name, First_name, Middle_initial.
Last_name, First_initial, Middle_name.
Last_name, First_initial, Middle_initial.
This format allows you to sort on this field by last name,
then first name. When the field is printed, you may
specify the format in which the name is to be printed.
For example:
Shell, John M.
Shell, J.M.
John M. Shell
114
FILE COMMANDS
Multiple Fields
After you define a field, the program will move you to the
next field. Use the Up and Down Arrow keys to move to
any previously defined field to modify it.
After you are finished defining fields, press <F10>.
You do not have to define any fields in a file. A file
without fields can be used to store text notes, print forms
or memos.
115
3by5 Chapter 7
Record Size
The next step in building a file is defining the record size.
The following menu will be displayed:
_____________________________________________________________________
2x4 >3x5< 4x6 5x7 Page VLR Other
512 bytes
_____________________________________________________________________
With this menu you define the size of each record in the
file. This is an important number. Once you specify it
for a file, it cannot be changed.
The following standard, fixed length record sizes are
available:
2x4 256 bytes
3x5 512 bytes
4x6 1024 bytes
5x7 2048 bytes
Page 4800 bytes
The default record size is 512 bytes. This number of
characters is sufficient for most references and addresses.
The standard variable length record size is 256 bytes
(minimum record length with a maximum length of 4800
bytes). See page 143 for more information on variable
length records.
116
FILE COMMANDS
Other (User defined record lengths and index densities)
If you select Other, the program will ask whether the
records are fixed length or variable length. Select one or
the other. If you select fixed length, the program will ask
for the record size (all records will be the same size). If
you select variable length records, the program will ask for
the minimum record length (all records will be at least as
long as the minimum record length - see page 143 for more
information).
117
3by5 Chapter 7
Index Density
Next, the program will prompt you for the Index Density.
This is a number between 1 and 5 and determines the size
of the index for each record. Larger records should have
higher index densities. The relationship between Index
Density and index record size is:
Index Index Size per
Density Record (bytes)
1 32
2 64
3 128
4 256
5 512
You may change the index density of a file by re-indexing
it. The program will ask for the new Index Density. The
most efficient Index Density for a file is dependent upon
many factors. You can experiment with the Index Density
for a particular file to find which value gives you the
fastest searches.
The program will then build the 3by5 source file and its
companion index file.
118
FILE COMMANDS
OPENING A NON-3by5 FILE
You may open and search (but not edit) a standard ASCII
text file or a WordStar or WordPerfect file. If the
program opens the file and finds that it is not a standard
3by5 file, it will ask you for the file type:
_____________________________________________________________________
FILE TYPE: 1.ASCII 2.WordStar 3.WordPerfect
_____________________________________________________________________
Press [1], [2] or [3] to indicate the file type.
If the file is not a dBASE file, the program will then ask
whether the file is a numbered reference file. If you type
[N] the following questions will be asked:
119
3by5 Chapter 7
The program will first ask you for record delimiter (i.e. the
character or pair of characters that defines the end of a
record):
_____________________________________________________________________
RECORD DELIMITER: 1.<CR><CR> 2.<CR> 3.Form Feed 4.Other
_____________________________________________________________________
[1] Specifies that each record is separated by two carriage
returns (one blank line). Each record is equivalent to a
paragraph of text.
[2] Specifies that each record is separated by one carriage
return. Each record is equivalent to a line of text.
[3] Specifies that the each record is delimited by a Form
Feed. Each record is equivalent to a page of text.
[4] Specifies that a special character is used to delimit
records. For example:
Name: John Jones
DOB: 09/23/45
@
Name: John Smith
DOB: 01/12/52
@
The character "@" had been defined as the Record
Delimiter, each line from the name line to the line
with "@" will be considered a block of text (record).
120
FILE COMMANDS
After the record delimiter is specified, the program will
then ask:
_____________________________________________________________________
FIELD DELIMITER: 0.None 1.<CR> 2.PRN 3.MailMerge 4.Other
_____________________________________________________________________
[0] Indicates that there are no fields in the record.
[1] Indicates that each field is separated by a carriage
return.
[2] Indicates that the file is a 1-2-3 PRN file in which
fields are separated by commas and text field are
enclosed in quotation marks. This type of record may
be generated in Basic by using the Write command.
[3] Indicates that each field is enclosed in quotation marks
and separated by a comma.
[4] Indicates another character is used to separate fields.
If you select this option, the program will prompt you
for the character to be used to separate fields.
121
3by5 Chapter 7
Numbered Reference Files
If you specify that the file is a Numbered Reference File,
the program will ask you whether there are less than 100
references in the file. The answer to this question is used
to determine spacing of reference numbers when references
are written to the file.
Next the program will ask whether there is a blank line
between references. Type [Y] or [N] depending on the file.
Then the program will ask for the starting reference
number. This question allows you to start with a reference
number other than one when appending references to an
already existing file. Type the starting reference number
and press <Enter>.
122
FILE COMMANDS
BUILDING A NON-3by5 FILE
If you attempt to open a file that does not exist, you will
be asked whether you want to build the file:
_____________________________________________________________________
Unable to open file. Do you want to build the file? (Y/N)
_____________________________________________________________________
Press [Y] to build the file, [N] to jump back to the Files
Command Menu.
If you pressed [Y], and any files are open, the program
will ask you:
_____________________________________________________________________
File: filename
Build like file (0-5): 0 = new file
_____________________________________________________________________
If one of the files is a non-3by5 file, type the number of
the file, and 3by5 will create the file on disk. Then you
will be asked for the file type and record delimiter.
123
3by5 Chapter 7
If no files are open, the program will ask you for the file
type:
_____________________________________________________________________
File Types:
A 3by5
B Letter
C Document
D Reference
E Reference Style
F Print Form
G Macro
H Program
I Mark
J ASCII, WordStar, WordPerfect
Select file type: A
_____________________________________________________________________
Press [J] to select a non-3by5 file. The file will be
opened, and the program will then ask you for the file
type:
_____________________________________________________________________
FILE TYPE: 1.ASCII 2.WordStar 3.WordPerfect
_____________________________________________________________________
Press [1], [2], or [3] to indicate the file type.
The program will then ask you for record delimiter and the
field delimiter. See the section on opening a non-3by5 file
for information on record and field delimiters.
124
FILE COMMANDS
FILES-CLOSE Command
_____________________________________________________________________
Open >Close< Records List Dir Maintenance Fields Status
Close file
_____________________________________________________________________
Whenever you exit from 3by5 by using the Exit Command,
all open files are automatically closed.
If you are going to remove a diskette from its drive while
running 3by5, make certain that any files on that diskette
are closed before removing the diskette. This prevents
DOS from writing incorrect information to the new
diskette.
To close a file, press [C] in response to the Files Command
Menu. The program will ask you for the number of the
file to close. Type the number of the file that you want
to close.
125
3by5 Chapter 7
FILES-RECORDS Command
_____________________________________________________________________
Open Close >Records< List Dir Maintenance Fields Status
Copy, Move or Erase records (sort option)
_____________________________________________________________________
The Records Command is used to copy or move records
from a source file to a destination file or from one
location in a file to another. The Copy Command makes a
copy of the source record and does not affect the source
record. The Move Command makes a copy and then erases
the source record.
Records that are Copied or Moved from a 3by5 file may be
sorted prior to being placed in the destination file.
The Records Command is also used to erase groups of
records. When a record is erased, the contents of the
record are over-written with blank spaces (ASCII 32).
Records marked during a search may be copied to a
destination file. The marked records are treated as file 0.
Press [R] for the Records Command. The following prompt
will appear at the bottom of the screen:
_____________________________________________________________________
>Copy< Move Erase
Copy a group of records (source records are not changed)
_____________________________________________________________________
Press [C] to copy a group of records from one file to
another. There are three possible ways to copy records.
From a 3by5 file to another 3by5 file, from a non-3by5 file
to a 3by5 file and from a 3by5 file to a non-3by5 file.
Each will be considered separately.
126
FILE COMMANDS
Copying from one 3by5 file to another 3by5 file
Press [C] to copy records. The program will ask for the
source file. Enter the number of the source file. The
program will then prompt you for the destination file.
Enter the number of the destination file. (The source file
and destination file can be the same file.)
Next the program will ask for the source range. Type the
starting record number and press <Enter>. Then type the
ending record number and press <Enter>.
The program will then ask for the destination starting
record. Type the starting record and press <Enter>.
If you are copying more than one record, the program will
ask if you want to sort the records. Press [Y] to sort the
records. If you sort the records and the source file has
one or more fields, the program will display all fields in
the file and ask you to select a primary sort field. Select
the field by pressing the corresponding field letter. If the
file has two or more fields, the program will ask for the
secondary sort field. Press <Enter> if there is no
secondary sort field. Otherwise select the secondary sort
field. The program will then sort the records and copy
them to the destination file.
As the records are being copied, the program will display
the number of the source record being copied and the
number of the corresponding destination record.
At the bottom of the screen the program will prompt you
to press <Esc> to stop the copying process.
127
3by5 Chapter 7
Copying Records from a Non-3by5 file to a 3by5 file
If the source file is a non-3by5 file, the program will
transfer all records into the 3by5 destination file. The
records will be appended to the end of the 3by5
destination file.
Copying Records from a 3by5 file to a non-3by5 file.
If the destination file is not a 3by5 file, the program will
append the records to the end of the file. The program
will prompt you for the range of records to be copied from
the 3by5 file. As with a 3by5 to 3by5 copy, you may sort
the records.
128
FILE COMMANDS
MOVING RECORDS
You may move records from a 3by5 source file to either a
3by5 destination file or a non-3by5 destination file. When
a record is moved, it is copied to the destination file, and
the original contents in the source file are erased. The
record is not deleted from the file and you may add text
to it at a later date.
The instructions for moving records are the same as for
copying records.
129
3by5 Chapter 7
ERASING RECORDS
You may erase any group of records in a 3by5 file. The
program will prompt you for the starting number and the
ending number. It will then erase the contents of each
record. The index will be updated. A record that is
erased, remains in the file and new information may later
be added. During a Copy, Move or Pack Command, records
that have been erased are not copied to the destination
file.
130
FILE COMMANDS
FILES-LIST Command
_____________________________________________________________________
Open Close Records >List< Dir Maintenance Fields Status
List of files in directory
_____________________________________________________________________
In response to the Files Command Menu press [L] to obtain
a listing of files in any directory. The program will
prompt you:
_____________________________________________________________________
List:
Type pattern for file. Press <Enter> for file list
_____________________________________________________________________
The program will inform you that you may press <F10> for
an extended list of the files (includes the file size and
date and time of creation or last update).
Type [*.3X5] <Enter> to list all 3by5 files with the
extension "3X5" in the current directory.
Type [*.*] <Enter> to list all files in the current
directory.
Type [*] <Enter> to list all 3by5 source files in the current
directory (files with extensions 3X5, LET, DOC, MAC, PFM,
REF, RFS and PRG).
The drive and directory path may also be specified (e.g.
A:\LEVEL1\LEVEL2\*.*].
After you press <Enter>, the current drive or directory will
be displayed and the files in the current directory will be
listed:
131
3by5 Chapter 7
_____________________________________________________________________
3by5 Files
Open Files
1
2
3
4
5
Dir: A:\ Free:
xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx
xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx
xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx
xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx
(O)pen (E)rase (R)ename (C)hange directory (Q)uit
_____________________________________________________________________
If there are more files in the directory than can fit on the
screen at one time, you can use the <Down Arrow> key to
scroll through the files. Up to 120 files may be listed in one
directory.
To open a file, position the cursor bar to the file and press
[O]. The file will be opened. Similarly, files may be erased
from the diskette by pressing [E], or renamed by pressing [R].
If you attempt to erase or rename a file that is open, the
program will inform you that the file is open. You must first
close the file, before erasing it.
Subdirectories are marked by a terminal asterisk (e.g.
LEVEL2*). To change directories, position the cursor bar to
the directory and press [C].
132
FILE COMMANDS
Extended Listings
Press <F10> after typing the file pattern the following will be
displayed:
_____________________________________________________________________
3by5 Files
Open Files
1
2
3
4
5
Drive A:\ Free:
xxxxxx zzz mm-dd-yyyy hh:mm | xxxxxx zzz mm-dd-yyyy hh:mm
xxxxxx zzz mm-dd-yyyy hh:mm | xxxxxx zzz mm-dd-yyyy hh:mm
xxxxxx zzz mm-dd-yyyy hh:mm | xxxxxx zzz mm-dd-yyyy hh:mm
xxxxxx zzz mm-dd-yyyy hh:mm | xxxxxx zzz mm-dd-yyyy hh:mm
xxxxxx zzz mm-dd-yyyy hh:mm | xxxxxx zzz mm-dd-yyyy hh:mm
xxxxxx zzz mm-dd-yyyy hh:mm | xxxxxx zzz mm-dd-yyyy hh:mm
(O)pen (E)rase (R)ename (C)hange directory (Q)uit
_____________________________________________________________________
xxxxxx is the name of the file.
zzz is the size of the file in bytes.
mm-dd-yyyy is the month, day and year of the creation
or last update.
hh:mm is the hour and minute of the creation or
last update.
133
3by5 Chapter 7
FILES-DIRECTORY Command
_____________________________________________________________________
Open Close Records List >Dir< Maintenance Fields Status
Directory Commands
_____________________________________________________________________
The Directory Command allows you to change the current
directory, or make or remove a directory. This command
is most useful for systems with hard disk drives, but may
be used on diskette based systems to specify the current
drive (e.g. A:\ or B:\).
Press [D] for the Directory Command. The following menu
will appear:
_____________________________________________________________________
>Change< Make Remove List
Change current directory
_____________________________________________________________________
Changing the current directory
Press [C]. The program will display the current directory
if you have changed it previously while in 3by5. It will
then prompt you for the name of the current directory.
_____________________________________________________________________
Directory:
Change current directory
_____________________________________________________________________
Type the path (including disk drive) of the directory that
you want to select as the current one and press <Enter>.
The program will set that directory as the current
directory. If there were any errors, you will be informed.
134
FILE COMMANDS
For example, A:\ will select the A drive and the root
directory; C:\LEVEL1\LEVEL2 will select the C drive and
directory level2.
Making or Removing a Directory
The Make and Remove Directory commands work similarly
to the Change Directory command. The name of the
directory must start with the drive, colon and back slash.
For example, the command to remove the following
directory "A:\LEVEL1\LEVEL2 will remove directory
LEVEL2. All files in a directory must be deleted before it
can be removed.
Listing Directories
Press [L] to list the directories directly accessible from the
current directory. The Directory-List Command works
similarly to the Files-List Command.
135
3by5 Chapter 7
FILES-MAINTENANCE Command
_____________________________________________________________________
Open Close Records List Dir >Maintenance< Fields Status
Index Pack
_____________________________________________________________________
FILES-MAINTENANCE-INDEX Command
The Index Command is used to index a 3by5 file that does
not have an index file (e.g. it was deleted using the DOS
Erase Command) or used to re-index a 3by5 file in which
the index file was damaged (e.g. disk write error).
Press [I] to index a file. The program will list the open
files and you will be asked to select a file. Press <Esc> if
you do not want to index a file. Otherwise select a file.
The program will ask you to enter the index density.
Enter a number between 1 and 5.
The program will then start to index the file. The number
of the record being indexed will be displayed at the bottom
of the screen.
Non-3by5 Files cannot be indexed.
136
FILE COMMANDS
FILES-MAINTENANCE-PACK Command
The Files-Maintenance-Pack Command removes wasted space
from Fixed Length Record and Variable Length Record
files. This includes records that have been erased and
wasted space that develops during the modification of
Variable Length Records.
Press [P] for Pack. The program will ask you to specify
the disk drive and directory that the program will use for
its temporary files. The free space on the disk drive
should be at least as much as that occupied by the Source
and Index Files being Packed.
After you specify the disk drive, the program will start the
packing procedure, which may take some time. You will be
informed of the program's progress.
Variable Length Record Files should be packed when the
amount of wasted space exceeds 20% of the file size.
137
3by5 Chapter 7
FIELDS COMMAND
_____________________________________________________________________
Open Close Records List Dir Maintenance >Fields< Status
Filter Redefine
_____________________________________________________________________
The Fields Command is used to filter (specify) fields that
will be copied to another file, or redefine the fields in a
file.
FILES-FIELDS-FILTER Command
The Fields Command is used to specify fields that will be
copied from one record to another. For example, you may
have a reference file with the following fields:
REF
CODE
KEYWORDS
COMMENTS
The REF field contains the authors, title and source in any
standard format suitable for publication. The CODE field
contains the code number under which you file the article.
The KEYWORDS field contains keywords that do not appear
in the title, but are useful in retrieving the document.
The COMMENTS field contains your comments on the
reference.
Suppose that you want to copy only the text in the REF
fields to a file for editing with your word processor. The
Fields Command is used to specify that when a record is
copied from the file only the text in the REF field is
copied. The destination file may be another 3by5 file, a
WordStar or WordPerfect document file or an ASCII text
file.
Press [F] to issue the Fields Command. If more than one
138
FILE COMMANDS
file is open, the program will ask you to enter the number
of the file for the Fields Command. The program will then
list the letter and name of the fields in the file:
_____________________________________________________________________
Fields in NEWREF.3X5
A REF
B CODE
C KEYWORDS
D COMMENTS
Fields to copy:
Type order of fields for copying. Empty line = all fields
_____________________________________________________________________
At the bottom of the screen the program will ask you to
type the order of the fields to be copied. If you enter a
blank line, the program will copy all fields in the same
order as they are in the file.
If you type [C] <Enter> only the KEYWORDS field will be
copied to another file.
You can specify the order of the fields. For example: if
you type [ADB] <Enter>, any records copied to another file
will include the REF field, the COMMENTS field and the
KEYWORDS field in that order.
The asterisk is used to insert a blank field. The "+"
character is used to concatenate two or more fields. The
"+" character followed by a "~" is used to concatenate a
carriage return to a field.
For example, the command [AC+~+B**D] <Enter> will copy
field A, concatenate the contents of field C, a carriage
return and the contents of field B and copy them as one
field, insert two blank fields in the destination file, and
139
3by5 Chapter 7
then copy the contents of field D.
FILES-FIELDS-REDEFINE Command
Press [R] to redefine the fields in a file. The program will
request the number of the file to use. Select the file.
If the file is a 3by5 file, the program will display the
fields in the file. You may modify the field types, field
formats and insert/delete fields. However, 3by5 does not
automatically change the contents of previously entered
data to match the new fields definitions. This must be
performed manually.
If the file is a non-3by5 file, the program will ask you to
redefine the fields.
140
FILE COMMANDS
STATUS COMMAND
_____________________________________________________________________
Open Close Records List Dir Maintenance Fields >Status<
Display status information on open files
_____________________________________________________________________
The Status Command is used to display information on an
open file. Press [S] to issue the command. If one file is
open, the status information will be displayed. If more
than one file is open, the program will ask you to enter
the number of the file. Type the number of the file and
the following information will be displayed:
File name: The drive, path and name of the file.
File type: If the file is a 3by5 file that was created
by a version of 3by5 before 4.0, the type
will be listed as 3by5OLD. Old source
files should be converted to the 4.0 format
by building a new file, and then using the
Files-Record-Copy Command to copy all
records to the new file.
Index: Indicates the type of index for the file.
All 3by5 files use Signature Screening
indexes (designated by a "Sig").
Record Size: Maximum length of each record if the file
has fixed length records. Minimum length
of each record if the file has variable
length records.
Fields: Up to 26 fields may be designated in a
3by5 file.
Records: The number of records in a file.
141
3by5 Chapter 7
If the file is a variable length record file, the program will
display the number of unused bytes in the file.
If the file is a non-3by5 file, the record and field
delimiters will be displayed.
142
FILE COMMANDS
VARIABLE LENGTH RECORDS
Variable length records have the advantage of reducing
wasted disk space. For example, if you are using standard
fixed length records of length 1000 bytes and have a
record with only 200 characters, then 800 bytes of disk
space are wasted.
The procedure for building a file is the same as that for a
standard 3by5 file except that the program will ask for the
minimum record size rather than the maximum record size.
The reason for requesting a minimum record size is as
follows.
As you add records to a 3by5 file, the records are
appended to the end of a file. In the diagram below the
file has 6 variable length records:
--------------------------------------
| 1 | 2 | 3 | 4 | 5 | 6 |
--------------------------------------
If you later want to update a record in the middle of a
file (e.g. record 4) there must be enough room for the
updated record. If you shorten the length of the record or
do not change its length, then the updated record is stored
in the original location:
--------------------------------------
| 1 | 2 | 3 | 4 | 5 | 6 |
--------------------------------------
* record 4 updated in place
If the updated record is longer than the original record,
the program must append the updated record to the end of
the file and delete the data where the old record was:
143
3by5 Chapter 7
-----------------------------------------------
| 1 | 2 | 3 |xxx| 5 | 6 | 4 |
-----------------------------------------------
*deleted data *new position of
record 4
Pointers in the index file allow you to read the file in the
original order of the records even though the sequential
order of the records has changed.
Assigning a minimum record length assures you that you
will be able to update most records in place. For example,
you may have a file that you update frequently. Most
records are on average 250 characters long, but some are
as long as 2000 characters. Assigning a minimum record
length of 250 bytes would allow you to update most records
in place.
When a record is modified beyond its minimum length, it is
appended to the end of the file, and the disk space
occupied by the original record is erased and is not used.
If you have frequent updates of this type, there can be a
considerable waste of disk space.
The File Status Command will inform you of the amount of
unused file space. If this number becomes too large, the
records in the file should be "packed" into another file
using the Files-Maintenance-Pack Command.
Alternatively, you can use the Files-Records-Copy
Command. For example, if the file is called REF, build a
new file (e.g. NEWREF) of the same type (same minimum
record length, fields, etc.). Copy all records from REF to
NEWREF. No deleted data will be copied to the new file.
You must use the 3by5 File Copy Command. The DOS
Copy Command will copy the entire 3by5 file and will not
eliminate any wasted space.
144